<?php 
set_time_limit(30);
header("Content-Type:text/html;charset=utf-8");
date_default_timezone_set('Asia/Shanghai');
error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);

defined('HOST_PATH') or define('HOST_PATH', dirname(__FILE__));

function print_format($value='',$name='value')
{
    echo "\n<PRE>\n";
    echo "<br />===================== {$name} =================<br />\n";
    print_r($value);
    echo "<br />-----------------------------------------------<br />\n";
}

$apkList = scandir(HOST_PATH.'/android/');
array_splice($apkList,0,2);
rsort($apkList);

$appList = scandir(HOST_PATH.'/iOS/');
array_splice($appList,0,2);
rsort($appList);

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
    <title>mobibook release package list</title>
    <link rel="stylesheet" href="style/css.css">
    <style type="text/css">
    	a, li{color:#0e88eb;}
    </style>
</head>
<body>
<h1>Mobibookapp</h1>
	<div id="apk">
	<h3>android</h3>
	<?php 
// print_format($apkList,'$apkList');
	echo '<ol>';
	foreach ($apkList as $key => $value)
	{
		if ($value != '.DS_Store') {
			echo '<li><a href="/android/'.$value.'" download="/android/'.$value.'">'.$value.'</a></li>';
		}
	}
	echo '</ol>';
	?>
	</div>
	<div id="app">
	<h3>iOS</h3>
	<?php 
// print_format($apkList,'$apkList');
	echo '<ol>';
	foreach ($appList as $key => $value)
	{
		if ($value != '.DS_Store') {
			echo '<li><a href="/iOS/'.$value.'" download="/iOS/'.$value.'">'.$value.'</a></li>';
		}
	}
	echo '</ol>';
	?>
	</div>
</body>
</html>



